/**   
  * @Title: InitController.java 
  * @Package framework.system.controller 
  * @Description: TODO(用一句话描述该文件做什么) 
  * @author Ching Wang  
  * @date 2013-5-2 下午4:03:30 
  * @version V1.0   
  */
package framework.system.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import framework.core.controller.BaseAction;
import framework.system.service.IInitService;

/**
 * @ClassName: InitController 
 * @Description: 初始化数据库数据的Controller
 * @author: Ching Wang
 * @date 2013-5-18 下午1:06:31 
 *
 */
@Controller
@RequestMapping(value="/initctrl")
public class InitController extends BaseAction{

	@Resource private IInitService initService;
	
	/**
	 * @Title: Init 
	 * @Description: 初始化数据库方法
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/init")
	public String Init(HttpSession session) throws Exception {
		initService.init();
		clearSession(session);
		return "redirect:/login.jsp";
	}
}
